﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Wwtfly.BBS.BackModels.ViewModels.LoginViewModel>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>BBS-后台登陆</title>
    <link href="<%=Url.Content("~/Content/Back/Login.css")%>" rel="stylesheet" type="text/css" />
   <script type="text/javascript" src="<%=Url.Content("~/Scripts/Shared/md5.js")%>"></script>
   <script type="text/javascript" src="<%=Url.Content("~/Scripts/Jquery/jquery-1.4.1.min.js")%>"></script>
   <script type="text/javascript">window.GetRandCodeUrl = '<%=Url.Action("GetRandCode") %>';</script>
</head>
<body>
    <div id="divlogin">
        <div class="logoback">
            <div style=" padding-top:25px;"></div>
            <img src="<%=Url.Content("~/Content/Back/Images/Logo.jpg")%>" alt="后台管理系统" />
        </div>
        <form action="<%=Url.Action("CheckLogin") %>" method="post" onsubmit="return onSubmit();">
        <table class="tab">
            <tr>
                <td class="tdIn">
                    用户名称
                </td>
                <td>

                <%
                    if (string.IsNullOrEmpty(Model.Login.UserName))
                    {
                        Model.Login.UserName = "sa";
                    }
                     %>
                    <%=Html.TextBoxFor(m => m.Login.UserName, 
                    new { @class = "in" ,maxlength="20",id="tbName"})%>
                </td>
            </tr>
            <tr>
                <td class="tdIn">
                    登录密码
                </td>
                <td>
                 <%=Html.PasswordFor(m => m.Login.UserName,
                                                              new { @class = "in", maxlength = "20", id = "tbPwd"})%>
                    <%=Html.HiddenFor(m => m.Login.UserPassword,
                                                                 new { id = "hidPwd" })%>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <%= Html.Submit("登陆","btnLogin",null) %>
                </td>
            </tr>
            <tr>
                <td class="tdVersion">
                   版本：
                </td>
                <td>
               <%=ViewData["Version"] %> 
                 V0.1Beta<%=Html.HiddenFor(m => m.Login.RandCode,
                                         new {id="randCode" })%>
                </td>
            </tr>
        </table>
        <br />
        <div id="errorMessage" style="color:red;"><%=Model.Login.ErrorMessage %></div>
        </form>
    </div>
    <script type="text/javascript" src="<%=Url.Content("~/Scripts/Back/Login.js")%>"></script>
</body>
</html>
